package sz.szsmk.citizencard.ui.activity;

import android.view.View;

import com.chenenyu.router.annotation.Route;
import sz.szsmk.citizencard.DaggerApplication;
import sz.szsmk.citizencard.R;
import sz.szsmk.citizencard.databinding.LoginBycodeBinding;
import sz.szsmk.citizencard.ioc.Compontent.DaggerCommonActivityComponent;
import sz.szsmk.citizencard.mvp.contract.ILoginBycodeContact;
import sz.szsmk.citizencard.mvp.presenter.LoginBycodePresenter;
import sz.szsmk.citizencard.ui.base.IBaseActivity;

/**
 * Copyright (c)2018
 * author: zdh
 * created on: 2018/6/9 10:15
 * description:验证码登录
 */
@Route("codebylogin")
public class LoginByCodeActivity extends IBaseActivity<LoginBycodePresenter, LoginBycodeBinding>
        implements ILoginBycodeContact.ILoginBycodeView, View.OnClickListener {
    @Override
    protected int attachLayoutRes() {
        return R.layout.login_bycode;
    }

    @Override
    protected void initInjector() {
        DaggerCommonActivityComponent.builder().appCompontent(DaggerApplication.getAppComponent())
                .build().inject(this);
    }

    @Override
    protected void initViews() {
        dataBinding.loginBack.setOnClickListener(this);
    }

    @Override
    protected void updateViews() {

    }

    @Override
    public void updataError(String message) {

    }

    @Override
    public void onClick(View v) {
        if (v.getId() == R.id.login_back) {
            finish();
        }
    }
}
